import sys, os, glob
defs     = ['_REENTRANT', 'DEBUG', 'DEBUGMEM']
includes = ['.', '../common', '../shared', '../hadoopops', '../hadoopops/gen-cpp', '../../includes', '../../includes/thrift']
libpath = ['.', '../../target/libs', '../../libs', '/usr/lib']
libs = ['common', 'hadoopops', 'shared', 'fcgi', 'thrift', 'z', 'pthread']
cflags = '-ggdb -pthread -Wall -Werror'
bin = 'unittest'
    
files = glob.glob("*.cpp") 
env = Environment(CFLAGS=cflags, CPPDEFINES=defs, CPPPATH=includes, LIBPATH=libpath, LIBS=libs)
target = env.Program(bin, files)

install_dir = '../../target/bin'
env.Install(install_dir, target)
env.Alias('install', install_dir)
